package com.summer.shopping.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.summer.shopping.domain.table.HelpCenter;
import com.summer.shopping.domain.table.dto.AnswerDTO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * ClassName:
 * Package:
 * Description:
 *
 * @Author: 陈三岁
 * @Create
 * @Version
 */

public interface HelpCenterMapper extends BaseMapper<HelpCenter> {

    @Insert("insert into help_center(title, description, publisher_id, publisher_name, update_time)" +
            " VALUES" +
            " (#{title}, #{description}, #{publisherId}, #{publisherName}, #{updateTime})")
    void insertProblem(HelpCenter helpCenter);

    @Update("update help_center set description = #{description} where help_id = #{helpId}")
    void updateProblemById(AnswerDTO answerDTO);
}
